<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
   <script>
         let arr=[];
         arr.length=10
        console.log(arr)
         arr.push('ewr')

       //  arr.splice(10, 1, 'ewr');
         console.log(arr)
   </script>
</body>
</html>